{{#  if(d.data.length === 0){ }}
无数据
{{#  }else{ }}
<!-- 表头 -->
<thead>
<tr>
    <th width="20"><input type="checkbox" ul-checkbox-name="head" lay-filter="ul-checkbox-head" lay-skin="primary"></th>
    <th width="40">序号</th>
    {{# layui.each(d.config['table'], function(index, item){ }}
    {{# if(item.is_hide == '1'){ }}
    <th style="display: none"></th>
    {{# }else{ }}
    <th width="{{item.width}}">{{item.title}}</th>
    {{# } }}
    {{# }); }}
</tr>
</thead>

<!-- 表内容 -->
<tbody>
{{# var i = 1; }}
{{# layui.each(d.data, function(index, item){ }}
<tr>
    <td><input ul-index="{{index}}" type="checkbox" ul-checkbox-name="sub" lay-skin="primary"></td>
    <td>{{i}}</td>
    {{# layui.each(d.config['table'], function(col_index, col_item){ }}
    {{# if(col_item.is_hide == '1'){ }}
    <td ul-query-name="{{col_item.name}}" style="display: none">
        <div class="ul-table-td-content">{{item[col_item.name]}}</div>
    </td>
    {{# }else{ }}
    <td ul-query-name="{{col_item.name}}">
        {{# if(col_item.type == 'text'){ }}
        <!-- 文本框 -->
        <div class="ul-table-td-content">{{item[col_item.name]}}</div>
        {{# }else if(col_item.type == 'select'){ }}
        <!-- 下拉框 -->
        {{# for(var i = 0; i<col_item.value.length;i++){ }}
        {{# if(col_item.value[i].key == item[col_item.name]){ }}
        <div>{{col_item.value[i].value}}</div>
        {{# break; }}}
        {{# } }}
        {{# }else if(col_item.type == 'img'){ }}
        <!-- 图片 -->
        <div ul-img="ul-img">
            {{#
            var imgs = '';
            try{
            imgs = item[col_item.name].match(d.reg);
            }catch(err){
            }
            }}
            {{# layui.each(imgs, function(img_index, img_item){ }}
            <img width="50" height="50" src="{{img_item}}">
            {{# }); }}
        </div>
        {{# }else if(col_item.type == 'a'){ }}
        <!-- a标签 -->
        <div>
            <a class="layui-btn layui-btn-primary layui-btn-sm" href="{{item[col_item.name]}}" target="_blank">{{col_item.title}}</a>
        </div>
        {{# }else if(col_item.type == 'a+img'){ }}
        <!-- 图片加文字链接 -->
        <div ul-img="ul-img" style="text-align: center">
            <img width="50" height="50" src="{{item[col_item.imgname]}}"><br/>
            <a href="{{item[col_item.aname]}}" target="_blank">
                {{col_item.atitle}}
            </a>
        </div>
        {{# } }}
    </td>
    {{# } }}
    {{# }); }}
</tr>
{{# i++;}}
{{# }); }}
</tbody>
{{#  } }}